﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL.Artwork;

namespace WebApplication.Art
{
    public partial class Edit : System.Web.UI.Page
    {

        private ArtworkService artworkService = new ArtworkService();
        public Models.Artworks artwork = new Models.Artworks();

        protected void Page_Load(object sender, EventArgs e)
        {
            string mode = Request.QueryString["mode"];
            string id = Request.QueryString["id"];


            if (mode != null && mode == "edit" && id != null)
            {
                int artworkId = Convert.ToInt32(id);

                artwork = artworkService.GetArtworkById(artworkId);
            }
        }
    }
}